package cn.shujuhai.common.domain;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * @Author: NiuYaHu
 * @Date: 2025/5/23 16:04
 * @Description:
 **/
@Data
public class PageRequest {
    @NotNull(message = "当前页码不能为空")
    @Min(value = 1, message = "当前页码必须大于等于1")
    @Max(value = Integer.MAX_VALUE, message = "当前页码不能超过整型范围")
    private Integer pageNum;

    @NotNull(message = "每页显示条数不能为空")
    @Min(value = 1, message = "每页显示条数必须大于等于1")
    @Max(value = Integer.MAX_VALUE, message = "每页显示条数不能超过整型范围")
    private Integer pageSize;
}